<!--
 * @Author: your name
 * @Date: 2021-11-05 23:02:04
 * @LastEditTime: 2021-11-06 18:35:45
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \ej-app2\src\views\Note.vue
-->
<template>
    <div class="order">
        <!-- show :{{show}} -->
          <!-- 没有订单的时候 -->
        <van-empty description="没有订单" v-show="show"/>
        <van-nav-bar title="订单" />

        <van-tabs v-model:active="active" sticky animated>
            <van-tab title="全部订单">
                <orders @getShow="getShow"/>
            </van-tab>
            <van-tab title="待派单">
                <orders status="待派单" @getShow="getShow"/>
            </van-tab>
            <van-tab title="待接单">
                <orders status="待接单" @getShow="getShow"/>
            </van-tab>
            <van-tab title="待确认">
                <orders status="待确认" @getShow="getShow"/>
                
            </van-tab>
            <van-tab title="已完成">
                <orders status="已完成" @getShow="getShow"/>
            </van-tab>
        </van-tabs>
        <div class="a"></div>
        <tabbar />
        
    </div>
</template>

<script>
import Orders from '../components/Orders.vue'
import Tabbar from '../components/Tabbar.vue'
export default {
  components: { Orders, Tabbar },
    data(){
        return{
            show:'',
        }
    },
    methods:{
        getShow(show){
            console.log("1")
            this.show=show
        }
    },
    created(){
        this.getShow()
    }
}
</script>

<style lang="less" scoped>
.a{
        content: "";
        width: 20px;
        height: 300px;
        opacity: 0;
    }
</style>